<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vconsole.min.js"></script>
    <script>
    // 初始化
    var vConsole = new VConsole();
    console.log('init vConsole');
    </script>
</head>
<body>
<button onclick="testCamera()" style="width: 100px;height: 30px">test</button>


<script>

function testCamera() {

    console.log('testcmaer');

    // window.hkNativeAndroid.postMessage(
    //         "Device",
    //         "camera",
    //         "param",
    //         123,
    // );

    if (window.hkNativeAndroid)
    {
        // window.hkNativeAndroid.postMessage(
        //         "Device",
        //         "camera",
        //         "param",
        //         123
        // );

        window.hkJSBridge.call({
            target: "Device",
            action: "camera",
            data: "data",
            callback: function () {
                console.log("callback");
            },
        });
    }
    else if(hkNativeAndroid)
    {
        console.log("exist hkNativeAndroid");
    }
    else
    {
        console.log('not exist hkNativeAndroid');
    }
}
</script>
</body>
</html>
